package com.zhiyou100.taxi.entity;

import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

public class CarOut implements Serializable {
    private String carOutId;

    private String carId;

    private String customerId;

    private String carCheckId;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date carOutStartTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date carOutEndTime;

    private Short carOutDayPrice;

    private Short carOutDeposit;

    private Double carOutOil;

    private String userId;

    private static final long serialVersionUID = 1L;

    public String getCarOutId() {
        return carOutId;
    }

    public void setCarOutId(String carOutId) {
        this.carOutId = carOutId == null ? null : carOutId.trim();
    }

    public String getCarId() {
        return carId;
    }

    public void setCarId(String carId) {
        this.carId = carId == null ? null : carId.trim();
    }

    public String getCustomerId() {
        return customerId;
    }

    public void setCustomerId(String customerId) {
        this.customerId = customerId == null ? null : customerId.trim();
    }

    public String getCarCheckId() {
        return carCheckId;
    }

    public void setCarCheckId(String carCheckId) {
        this.carCheckId = carCheckId == null ? null : carCheckId.trim();
    }

    public Date getCarOutStartTime() {
        return carOutStartTime;
    }

    public void setCarOutStartTime(Date carOutStartTime) {
        this.carOutStartTime = carOutStartTime;
    }

    public Date getCarOutEndTime() {
        return carOutEndTime;
    }

    public void setCarOutEndTime(Date carOutEndTime) {
        this.carOutEndTime = carOutEndTime;
    }

    public Short getCarOutDayPrice() {
        return carOutDayPrice;
    }

    public void setCarOutDayPrice(Short carOutDayPrice) {
        this.carOutDayPrice = carOutDayPrice;
    }

    public Short getCarOutDeposit() {
        return carOutDeposit;
    }

    public void setCarOutDeposit(Short carOutDeposit) {
        this.carOutDeposit = carOutDeposit;
    }

    public Double getCarOutOil() {
        return carOutOil;
    }

    public void setCarOutOil(Double carOutOil) {
        this.carOutOil = carOutOil;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId == null ? null : userId.trim();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        CarOut other = (CarOut) that;
        return (this.getCarOutId() == null ? other.getCarOutId() == null : this.getCarOutId().equals(other.getCarOutId()))
                && (this.getCarId() == null ? other.getCarId() == null : this.getCarId().equals(other.getCarId()))
                && (this.getCustomerId() == null ? other.getCustomerId() == null : this.getCustomerId().equals(other.getCustomerId()))
                && (this.getCarCheckId() == null ? other.getCarCheckId() == null : this.getCarCheckId().equals(other.getCarCheckId()))
                && (this.getCarOutStartTime() == null ? other.getCarOutStartTime() == null : this.getCarOutStartTime().equals(other.getCarOutStartTime()))
                && (this.getCarOutEndTime() == null ? other.getCarOutEndTime() == null : this.getCarOutEndTime().equals(other.getCarOutEndTime()))
                && (this.getCarOutDayPrice() == null ? other.getCarOutDayPrice() == null : this.getCarOutDayPrice().equals(other.getCarOutDayPrice()))
                && (this.getCarOutDeposit() == null ? other.getCarOutDeposit() == null : this.getCarOutDeposit().equals(other.getCarOutDeposit()))
                && (this.getCarOutOil() == null ? other.getCarOutOil() == null : this.getCarOutOil().equals(other.getCarOutOil()))
                && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getCarOutId() == null) ? 0 : getCarOutId().hashCode());
        result = prime * result + ((getCarId() == null) ? 0 : getCarId().hashCode());
        result = prime * result + ((getCustomerId() == null) ? 0 : getCustomerId().hashCode());
        result = prime * result + ((getCarCheckId() == null) ? 0 : getCarCheckId().hashCode());
        result = prime * result + ((getCarOutStartTime() == null) ? 0 : getCarOutStartTime().hashCode());
        result = prime * result + ((getCarOutEndTime() == null) ? 0 : getCarOutEndTime().hashCode());
        result = prime * result + ((getCarOutDayPrice() == null) ? 0 : getCarOutDayPrice().hashCode());
        result = prime * result + ((getCarOutDeposit() == null) ? 0 : getCarOutDeposit().hashCode());
        result = prime * result + ((getCarOutOil() == null) ? 0 : getCarOutOil().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", carOutId=").append(carOutId);
        sb.append(", carId=").append(carId);
        sb.append(", customerId=").append(customerId);
        sb.append(", carCheckId=").append(carCheckId);
        sb.append(", carOutStartTime=").append(carOutStartTime);
        sb.append(", carOutEndTime=").append(carOutEndTime);
        sb.append(", carOutDayPrice=").append(carOutDayPrice);
        sb.append(", carOutDeposit=").append(carOutDeposit);
        sb.append(", carOutOil=").append(carOutOil);
        sb.append(", userId=").append(userId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}